<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>kendo spreadsheet</title>
	<link rel="stylesheet" type="text/css" href="kendo.common.min.css">
	<link rel="stylesheet" type="text/css" href="kendo.silver.min.css">
	<style type="text/css" media="screen">
		*{padding: 0;margin: 0;}
	</style>
</head>
<body style="height: 100vh;">
	<div id="spreadsheet" style="width: 100%;height:100%;"></div>
	<script src="jquery.js"></script>
	<script src="kendo.custom.js"></script>
	<script src="jszip.min.js"></script>
	<script src="SpreadsheetFiller.js"></script>
	<script>
		$.ajax({
        url: "/kendospreadsheet/data/5.json",
        type: "get",
        success: function(data, stats) {
            alert(data);
        },
        error: function(data) {
            var d1 = [{mian_17_BQSJSE: "0", rep_LJYNSE03: "1" },{mian_17_BQSJSE: "0", rep_LJYNSE03: "2" },{mian_17_BQSJSE: "0", rep_LJYNSE03: "3" }];
            var d2 = {
                "板块": {
                    "炼油": {
                        "jxJe": 100,
                        "xxJe": 200,
                        "dkJe": 300
                    },
                    "炼气": {
                        "jxJe": 150,
                        "xxJe": 250,
                        "dkJe": 350
                    },
                    "后勤": {
                        "jxJe": 170,
                        "xxJe": 270,
                        "dkJe": 370
                    }
                },
                "区域": {
                    "华东": {
                        "jxJe": -100,
                        "xxJe": -200,
                        "dkJe": -300
                    },
                    "华南": {
                        "jxJe": -100,
                        "xxJe": -200,
                        "dkJe": -300
                    },
                    "非洲": {
                        "jxJe": -100,
                        "xxJe": -200,
                        "dkJe": -300
                    }
                }
            }
            $("#spreadsheet").kendoSpreadsheet().data("kendoSpreadsheet").fromJSON(data.responseText,true);
            // new SpreadsheetFiller({
            //     spreadsheet: $('#spreadsheet').data("kendoSpreadsheet"),
            // }).doFill({
            //     sheetName: 'Sheet2',
            //     type: 'multi-column',
            //     range : {
            //       row: 10, // (row, col)确定填充起始点
            //       col: 1,
            //       rowCount: 20 // 复制范围从A1:A{rowCount}
            //     }
            // }, d1);
        }
    });
	</script>
</body>
</html>